package com.kotlin.android.app.ui

import android.content.Intent
import com.kotlin.android.app.R
import com.kotlin.android.app.databinding.ActivityDaikuanBinding
import com.kotlin.android.core.BaseVMActivity
import com.kotlin.android.core.BaseViewModel
import com.kotlin.android.ktx.ext.click.onClick
import com.kotlin.android.ktx.ext.immersive.immersive
import com.kotlin.android.ktx.ext.log.e
import com.kotlin.android.media.image.coil.loadImage

class DaikuanActivity : BaseVMActivity<BaseViewModel, ActivityDaikuanBinding>() {
    private var yanjing = false

    override fun initTheme() {
        super.initTheme()
        immersive().statusBarColor(getColor(R.color.color_ffffff)).statusBarDarkFont(true)
    }

    override fun initView() {
        mBinding?.imageIv?.apply {
            setImageResource(R.drawable.daikuan)
            onClick {
                Intent(this@DaikuanActivity, JiluActivity::class.java).apply {
                }.also {
                    startActivity(it)
                }
//                finish()
            }
        }
        mBinding?.image1Iv?.onClick {
            yanjing = !yanjing
            mBinding?.imageIv?.setImageResource(if (yanjing) R.drawable.daikuan_yanjing else R.drawable.daikuan)
        }
        mBinding?.image2Iv?.onClick {
            finish()
        }
    }

    override fun initData() {
    }

    override fun startObserve() {
    }
}